package com.mh.alltest.test2;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Slf4j
@Component
public class TestMqtt {

    @Autowired
    MqttMyClient mqttMyClient;

//    @PostConstruct
    public void start(){

        mqttMyClient.sub();
        mqttMyClient.mqttClient = null;

        mqttMyClient.initMqttClient();
        mqttMyClient.sub();

    }

}
